<?php
use yii\helpers\Url;
use yii\web\View;
use app\assets\IndexAsset;
IndexAsset::register($this); 
$this->title="登录系统 -- Sacrebleu DSP";
?>
<div class="row">
  <div class="col-md-4 col-md-offset-4">
    <div class="site-login">
      <h1>ValueMaker DSP <small>登录</small></h1>
      <form class="form" id="data-frm" method="post" action="<?= Url::to(['index/login'])?>" role="form">
        <div class="form-group">
          <div class="input-group input-group-lg">
            <span class="input-group-addon" id="username-addon"> 
              <i class="fa fa-envelope"></i>
            </span>
            <input type="text" class="form-control" placeholder="请输入邮箱名" name="user_email" aria-describedby="useremail-addon" id="user_email">
          </div>
          <div class="help-block text-error" id="user_email_err"></div>
        </div>
        <div class="form-group">
          <div class="input-group input-group-lg">
            <span class="input-group-addon" id="username-addon"> 
              &nbsp;<i class="fa fa-lock"></i>
            </span>
            <input type="password" class="form-control" placeholder="请输入密码" name="user_pwd" aria-describedby="username-addon" id="user_pwd">
          </div>
          <div class="help-block text-error" id="user_pwd_err"></div>
        </div>
        <!-- <div class="checkbox">
          <label>
            <input type="checkbox" name="remember-me" value="true"> 记住我
          </label>
        </div> -->
        <div class="form-group">
          <button type="submit" class="btn btn-success btn-lg pull-right" data-loading-text="<i class='fa fa-spinner fa-spin'></i> 登录中...">
            登录 <i class="fa fa-arrow-circle-right"></i>
          </button>
        </div>
      </form>
    </div>
  </div>
</div>
<?php
  $nextUrl = Url::to(['home/index']);
  $this->registerJs("VAM.setVar('NEXT_URL','$nextUrl');", View::POS_HEAD);
?>
<script type="text/javascript" >
  requirejs(["<?= Yii::getAlias('@web/').Yii::$app->params['envDir'];?>/js/site/login.js"], function(common) {
  });
</script>